Earthquakes are formed along fault lines.
At fault lines the rocks are sliding past each other and will eventually cause a crack in the Earth's surface.